import java.io.Serial;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Scanner;

public class Film implements Serializable{
    @Serial
    private static final long serialVersionUID = 1L;
    public transient Scanner in =  new Scanner(System.in);
    private String Title;
    private String Author;
    private String Star;
    private String Plot;
    private int DurationMinutes;
    private int Grade;
    private int money;
    public Film(String Title, String Author, String Star, String Plot, int Time, int Grade,int money) {
        this.Title = Title;
        this.Author = Author;
        this.Star = Star;
        this.Plot = Plot;
        this.DurationMinutes = Time;
        this.Grade = Grade;
        this.money = money;
    }
    public int getGrade(){
        return Grade;
    }
    public void message(){
        System.out.println("电影名："+this.Title+"\n"+"导演："+this.Author+"\n"+"主演："+this.Star+"\n"+"情节："+this.Plot+"\n"+"时长："+this.DurationMinutes+"\n"+"评级："+this.Grade);
    }

    public int getDurationMinutes() {
        return DurationMinutes;
    }
    public  boolean isOnBoard() {
        for (Session sessions : Plan.sessions) {
            if (sessions.getFilms().equals(this)) {
                return true;
            }
        }
        return false;
    }

    public String getTitle() {
        return Title;
    }
    public void setTitle(String Title) {
        this.Title = Title;
    }
    public String getAuthor() {
        return Author;
    }
    public void setAuthor(String Author) {
        this.Author = Author;
    }
    public void setStar(String star) {
        this.Star = star;
    }
    public String getStar() {
        return  Star;
    }
    public void setPlot(String plot) {
        this.Plot = plot;
    }
    public void setDurationMinutes(int durationMinutes) {
        this.DurationMinutes = durationMinutes;
    }
    public void setGrade(int grade) {
        this.Grade = grade;
    }
    public int getMoney() {
        return money;
    }

    public void setMoney(int money) {
        this.money = money;
    }
}